OSEK_OS
 
 
 Bean OSEK_OS
 
Encapsulation of OSEK/VDX compliant OS - HW specific configuration

Typical usage of the bean in user's code.

Typical Usage:

Let's suppose that a OSEK_OS bean name is os1 and MC9S12DP256 Cpu is in the project. A System timer is selected with the name of associated counter object Counter1. There is one more bean (except the Cpu bean) in the project - AsynchroSerial with the name AS1, which uses interrupt vector "Vsci0". After code generation, OSEK configuration file TargetMcu.oin is generated which looks like this example:
OS os1 {                      //OS object name is the same 
                              //as OSEK_OS bean name   
  CC = ECC1;
  IsrStackSize = 32;   
  TargetMCU = S12DP256 {
    ....
    SysTimer = HWCOUNTER {
      COUNTER = Counter1;     //Counter associated to the SysTimer
      ....
    };
    ....    
  };
};
COUNTER Counter1 {            //Counter object declaration  
  ....
};
ISR AS1_Interrupt {           //Interrupt handler associated 
			      //with the vector "Vsci0"  
  ....
};
....
Further target specific include file TargetInclude.oin is generated, in this case it contains:
#include "ost2212.oin" 
User should use the object name Counter1 and include both TargetMcu.oin and TargetInclude.oin in his configuration file (example):
OIL_VERSION = "2.3";

#include "TargetInclude.oin"

CPU cpu1 {
     APPMODE Mode;
#include "TargetMcu.oin"   //include generated oil file
    OS os1 {                   //use OSEK_OS bean name     
        ....                   //add other attributes of OS object  
    };
};
....        

For more about typical usage of the bean code please refer to the page Bean Code Typical Usage.


Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.